package com.example.administrator.tiyuapp.HeaderFragment.Bean;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * Created by Ved on 2017/1/17.
 */
public class HeadlineBean {
    /**
     * id : 4844
     * channel_id : 0
     * channel_name : 推荐
     * image_type : 2
     * image : 417/1484612023152_cq5wkh.jpg
     * text : 门神扑点巴卡破门 米兰连扳两球2-2都灵
     * subtitle : 意甲
     * type : 4
     * link : 4478
     * sort : 0
     * create_time : Tue Jan 17 08:14:13 +0800 2017
     * editor : 饶志远
     * public_time : Tue Jan 17 08:14:10 +0800 2017
     * video_flag : true
     * contest_flag : true
     * contest_content : {"contest_id":193615,"topic_id":4478,"create_time":"Tue Jan 17 08:13:14 +0800 2017","editor":"饶志远","contest":{"contest_id":193615,"target_id":9820627,"cup_id":23,"cup_name":"意甲","color":"#190000","contest_type":0,"home_team":3176,"home_scores":2,"away_team":791,"away_scores":2,"start_time":"Tue Jan 17 03:45:00 +0800 2017","status":-1,"settle":27,"odds_type":27,"level":1,"bet_count":2,"lock_flag":false,"belong_five":true,"longbi":false,"h_t":{"t_id":3176,"name":"都灵","logo":"2696.png"},"a_t":{"t_id":791,"name":"AC米兰","logo":"2692.png"},"settle_statu":0,"ext_flag":1,"room_id":6415,"init_count":0},"contest_type":0,"type":0,"link":"","select_flag":false}
     */

    private int id;
    private int channel_id;
    private String channel_name;
    private int image_type;
    private String image;
    private String text;
    private String subtitle;
    private int type;
    private String link;
    private int sort;
    private String create_time;
    private String editor;
    private String public_time;
    private boolean video_flag;
    private boolean contest_flag;
    private ContestContentBean contest_content;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getChannel_id() {
        return channel_id;
    }

    public void setChannel_id(int channel_id) {
        this.channel_id = channel_id;
    }

    public String getChannel_name() {
        return channel_name;
    }

    public void setChannel_name(String channel_name) {
        this.channel_name = channel_name;
    }

    public int getImage_type() {
        return image_type;
    }

    public void setImage_type(int image_type) {
        this.image_type = image_type;
    }

    public String getImage() {
        return "http://lifeixphoto.qiniudn.com/" + image + "?imageView2/1/w/864/h/555/format/jpg";
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public String getPublic_time() {
        Date date = null;
        try {
            date = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZZ yyyy", Locale.ENGLISH).parse(public_time.replace("+", "-").replace("8", "5"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        SimpleDateFormat dateFormat = new SimpleDateFormat("MM月dd日 E", Locale.CHINA);
        return dateFormat.format(date);
    }

    public void setPublic_time(String public_time) {
        this.public_time = public_time;
    }

    public boolean isVideo_flag() {
        return video_flag;
    }

    public void setVideo_flag(boolean video_flag) {
        this.video_flag = video_flag;
    }

    public boolean isContest_flag() {
        return contest_flag;
    }

    public void setContest_flag(boolean contest_flag) {
        this.contest_flag = contest_flag;
    }

    public ContestContentBean getContest_content() {
        return contest_content;
    }

    public void setContest_content(ContestContentBean contest_content) {
        this.contest_content = contest_content;
    }

    public static class ContestContentBean {
        /**
         * contest_id : 193615
         * topic_id : 4478
         * create_time : Tue Jan 17 08:13:14 +0800 2017
         * editor : 饶志远
         * contest : {"contest_id":193615,"target_id":9820627,"cup_id":23,"cup_name":"意甲","color":"#190000","contest_type":0,"home_team":3176,"home_scores":2,"away_team":791,"away_scores":2,"start_time":"Tue Jan 17 03:45:00 +0800 2017","status":-1,"settle":27,"odds_type":27,"level":1,"bet_count":2,"lock_flag":false,"belong_five":true,"longbi":false,"h_t":{"t_id":3176,"name":"都灵","logo":"2696.png"},"a_t":{"t_id":791,"name":"AC米兰","logo":"2692.png"},"settle_statu":0,"ext_flag":1,"room_id":6415,"init_count":0}
         * contest_type : 0
         * type : 0
         * link :
         * select_flag : false
         */

        private int contest_id;
        private int topic_id;
        private String create_time;
        private String editor;
        private ContestBean contest;
        private int contest_type;
        private int type;
        private String link;
        private boolean select_flag;

        public int getContest_id() {
            return contest_id;
        }

        public void setContest_id(int contest_id) {
            this.contest_id = contest_id;
        }

        public int getTopic_id() {
            return topic_id;
        }

        public void setTopic_id(int topic_id) {
            this.topic_id = topic_id;
        }

        public String getCreate_time() {
            return create_time;
        }

        public void setCreate_time(String create_time) {
            this.create_time = create_time;
        }

        public String getEditor() {
            return editor;
        }

        public void setEditor(String editor) {
            this.editor = editor;
        }

        public ContestBean getContest() {
            return contest;
        }

        public void setContest(ContestBean contest) {
            this.contest = contest;
        }

        public int getContest_type() {
            return contest_type;
        }

        public void setContest_type(int contest_type) {
            this.contest_type = contest_type;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }

        public boolean isSelect_flag() {
            return select_flag;
        }

        public void setSelect_flag(boolean select_flag) {
            this.select_flag = select_flag;
        }

        public static class ContestBean {
            /**
             * contest_id : 193615
             * target_id : 9820627
             * cup_id : 23
             * cup_name : 意甲
             * color : #190000
             * contest_type : 0
             * home_team : 3176
             * home_scores : 2
             * away_team : 791
             * away_scores : 2
             * start_time : Tue Jan 17 03:45:00 +0800 2017
             * status : -1
             * settle : 27
             * odds_type : 27
             * level : 1
             * bet_count : 2
             * lock_flag : false
             * belong_five : true
             * longbi : false
             * h_t : {"t_id":3176,"name":"都灵","logo":"2696.png"}
             * a_t : {"t_id":791,"name":"AC米兰","logo":"2692.png"}
             * settle_statu : 0
             * ext_flag : 1
             * room_id : 6415
             * init_count : 0
             */

            private int contest_id;
            private int target_id;
            private int cup_id;
            private String cup_name;
            private String color;
            private int contest_type;
            private int home_team;
            private int home_scores;
            private int away_team;
            private int away_scores;
            private String start_time;
            private int status;
            private int settle;
            private int odds_type;
            private int level;
            private int bet_count;
            private boolean lock_flag;
            private boolean belong_five;
            private boolean longbi;
            private HTBean h_t;
            private ATBean a_t;
            private int settle_statu;
            private int ext_flag;
            private int room_id;
            private int init_count;

            public int getContest_id() {
                return contest_id;
            }

            public void setContest_id(int contest_id) {
                this.contest_id = contest_id;
            }

            public int getTarget_id() {
                return target_id;
            }

            public void setTarget_id(int target_id) {
                this.target_id = target_id;
            }

            public int getCup_id() {
                return cup_id;
            }

            public void setCup_id(int cup_id) {
                this.cup_id = cup_id;
            }

            public String getCup_name() {
                return cup_name;
            }

            public void setCup_name(String cup_name) {
                this.cup_name = cup_name;
            }

            public String getColor() {
                return color;
            }

            public void setColor(String color) {
                this.color = color;
            }

            public int getContest_type() {
                return contest_type;
            }

            public void setContest_type(int contest_type) {
                this.contest_type = contest_type;
            }

            public int getHome_team() {
                return home_team;
            }

            public void setHome_team(int home_team) {
                this.home_team = home_team;
            }

            public int getHome_scores() {
                return home_scores;
            }

            public void setHome_scores(int home_scores) {
                this.home_scores = home_scores;
            }

            public int getAway_team() {
                return away_team;
            }

            public void setAway_team(int away_team) {
                this.away_team = away_team;
            }

            public int getAway_scores() {
                return away_scores;
            }

            public void setAway_scores(int away_scores) {
                this.away_scores = away_scores;
            }

            public String getStart_time() {
                return start_time;
            }

            public void setStart_time(String start_time) {
                this.start_time = start_time;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public int getSettle() {
                return settle;
            }

            public void setSettle(int settle) {
                this.settle = settle;
            }

            public int getOdds_type() {
                return odds_type;
            }

            public void setOdds_type(int odds_type) {
                this.odds_type = odds_type;
            }

            public int getLevel() {
                return level;
            }

            public void setLevel(int level) {
                this.level = level;
            }

            public int getBet_count() {
                return bet_count;
            }

            public void setBet_count(int bet_count) {
                this.bet_count = bet_count;
            }

            public boolean isLock_flag() {
                return lock_flag;
            }

            public void setLock_flag(boolean lock_flag) {
                this.lock_flag = lock_flag;
            }

            public boolean isBelong_five() {
                return belong_five;
            }

            public void setBelong_five(boolean belong_five) {
                this.belong_five = belong_five;
            }

            public boolean isLongbi() {
                return longbi;
            }

            public void setLongbi(boolean longbi) {
                this.longbi = longbi;
            }

            public HTBean getH_t() {
                return h_t;
            }

            public void setH_t(HTBean h_t) {
                this.h_t = h_t;
            }

            public ATBean getA_t() {
                return a_t;
            }

            public void setA_t(ATBean a_t) {
                this.a_t = a_t;
            }

            public int getSettle_statu() {
                return settle_statu;
            }

            public void setSettle_statu(int settle_statu) {
                this.settle_statu = settle_statu;
            }

            public int getExt_flag() {
                return ext_flag;
            }

            public void setExt_flag(int ext_flag) {
                this.ext_flag = ext_flag;
            }

            public int getRoom_id() {
                return room_id;
            }

            public void setRoom_id(int room_id) {
                this.room_id = room_id;
            }

            public int getInit_count() {
                return init_count;
            }

            public void setInit_count(int init_count) {
                this.init_count = init_count;
            }

            public static class HTBean {
                /**
                 * t_id : 3176
                 * name : 都灵
                 * logo : 2696.png
                 */

                private int t_id;
                private String name;
                private String logo;

                public int getT_id() {
                    return t_id;
                }

                public void setT_id(int t_id) {
                    this.t_id = t_id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public String getLogo() {
                    return "http://roi.skst.cn/logo/" + logo;
                }

                public void setLogo(String logo) {
                    this.logo = logo;
                }
            }

            public static class ATBean {
                /**
                 * t_id : 791
                 * name : AC米兰
                 * logo : 2692.png
                 */

                private int t_id;
                private String name;
                private String logo;

                public int getT_id() {
                    return t_id;
                }

                public void setT_id(int t_id) {
                    this.t_id = t_id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public String getLogo() {
                    return "http://roi.skst.cn/logo/" + logo;
                }

                public void setLogo(String logo) {
                    this.logo = logo;
                }
            }
        }
    }
}
